<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="renderer" content="webkit"/>
  <title>登录 - <@toParam code="PORTAL_NAME"/></title>
  <link href="<@toParam code="PATH"/>/hplus/css/bootstrap.min.css" rel="stylesheet">
  <link href="<@toParam code="PATH"/>/hplus/css/animate.min.css" rel="stylesheet">
  <link href="<@toParam code="PATH"/>/hplus/css/style.min.css" rel="stylesheet">
  <link href="<@toParam code="PATH"/>/hplus/css/login.min.css" rel="stylesheet">
  <script>
  	if(window.top!==window.self){window.top.location=window.location};
  </script>
</head>
<body class="signin">
	<div class="signinpanel">
		<div class="row">
			<div class="col-sm-8">
      	<div class="signin-info animated fadeInLeft">
        	<div class="logopanel m-b"><h1><@toParam code="PORTAL_NAME"/></h1></div>
          <div class="m-b"></div>
            <ul class="m-b">
                <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 模块化开发模式</li>
                <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 模块间高度解耦</li>
                <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 按业务需求自由组合</li>
                <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 一次开发多处使用</li>
            </ul>
         </div>
       </div>
        <div class="col-sm-4">
            <form method="post" class="animated fadeInRight" class="am" action="loginCheck" onsubmit="return ajaxLogin(this)">
                <h4 class="no-margins">系统登录</h4>
                <p class="m-t-md">请输入您的用户名和密码</p>
                <input type="text" name="username" class="form-control uname" placeholder="用户名" />
                <input type="password" name="password" class="form-control pword m-b" placeholder="密码" />
                <a href="#" style="color:white;">忘记密码？</a>
                <button class="btn btn-success btn-block">登录</button>
            </form>
        </div>
			</div>
      <div class="signup-footer animated fadeInUp">
      	<div class="pull-left">Copyright &copy; 2016 All Rights Reserved. <@toParam code="ICP"/></div>
        <div class="pull-right">Powered by <a href="http://www.ztjava.com" target="_blank">ZTJava</a></div>
      </div>
    </div>
	<script src="<@toParam code="PATH"/>/hplus/js/jquery.min.js"></script>
	<script src="<@toParam code="PATH"/>/hplus/js/bootstrap.min.js"></script>
	<script src="<@toParam code="PATH"/>/hplus/js/plugins/layer/layer.min.js"></script>
  <script type="text/javascript">
  	function ajaxLogin(form) {
  		var $form = $(form);
  		var username = $form.find("input[name='username']");
  		var password = $form.find("input[name='password']");
  		if(username.val()==""){
  			username.focus();
  			layer.msg("请输入用户名！");
  			return false;
  		}
  		if(password.val()==""){
  			password.focus();
  			layer.msg("请输入密码！");
  			return false;
  		}
			$.ajax({
				type: 'POST',
				url:$form.attr("action"),
				data:$form.serializeArray(),
				dataType:"json",
				cache: false,
				success: function(json){
					if(json.result=="success") {
				  	layer.msg(json.message);
						window.location = "index";
					}else {
						layer.alert(json.message,{icon: 2});
					}
				},
				error: function(){
					layer.alert(json.message,{icon: 2});
				}
			});
  		return false;
  	}
  </script>
</body>
</html>